/**
 * @file summary.h
 * @author Andreas Bok Andersen
 * @brief Superclass file for Summaries StreamSummaryBucket and StreamSummaryBuffer
 * Defines interface subclasses
 *
 */
#include <tr1/unordered_map>
#include <tr1/unordered_set>
#include <vector>
#include <memory>
#include <stdlib.h>
#include <exception>
#include <boost/format.hpp>
#include <fstream>
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/construct.hpp>
#include <boost/foreach.hpp>
#include <string.h>
#include <sstream>
#include <iostream>
#include "entry.h"
#include <assert.h>
#define SUMMARY

using namespace std;
using namespace tr1;

typedef vector<Entry> ENTRY_VEC;
typedef vector<Entry*> ENTRY_REF_VEC;
typedef unordered_map<int, Entry> INT_ENTRY_MAP;
typedef unordered_map<size_t, Entry> HASH_ENTRY_MAP;
typedef unordered_map<size_t, Entry*> INT_ENTRY_REF_MAP;
typedef unordered_map<size_t, Entry*> HASH_ENTRY_REF_MAP;
typedef unordered_set<Entry*> ENTRY_P_SET;
typedef unordered_set<Entry> ENTRY_SET;
class Summary {

protected:
	int k;

public:
	Summary(int _k) :
			k(_k) {
	};
	~Summary() {

	};

	/**
	 * Inserts matrix element (i,j) with value val
	 * @param i row index
	 * @oaram column index
	 * @val value
	 */
	virtual void insert(int i, int j, float val) {};
	/**
	 * @return Returns summary as a vector of Entry
	 */
	virtual ENTRY_VEC get_summary() {
	}
	;
	/**
	 * Fill entries into array of Entry. Argument is passed by reference
	 * @param entries[] pointer to array of Entry
	 */
	virtual void get_summary(Entry entries[]) {
	}
	;
	/**
	 * Fill entries into vector of Entry. Argument is passed by reference
	 * @param entries pointer to vector<Entry>
	 */
	virtual void get_summary(ENTRY_VEC *entries) {
	}
	;
	/**
	 * @return String representation of summary
	 */
	virtual string to_string() {
		cerr << "Summary to string " << endl;
		return "";
	}
	;
	/**
	 * @return Returns size of summary
	 */
	virtual int summarysize() {
	}
	;
};

#include "streamsummarybuffer.cpp"
//#include "streamsummarybucket.cpp"
#include "streamsummarybucket_ptr.cpp"
